<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::get('think', function () {
    return 'hello,ThinkPHP5!';
});

Route::group('api/test',[
    //测试
    'wechatcode'=>['api/Ldfcodetest/code',['method' => 'get']],
    'emojitest'=>['api/Ldfcodetest/emojitest',['method' => 'get']],
]);


//用户相关接口
Route::group('api/account',[
    //小程序登录
    'login'=>['api/Account/splogin',['method' => 'post']],
    //获取用户信息
    'userinfo'=>['api/Account/userinfo',['method' => 'get']],
]);

//"我的"相关接口
Route::group('api/user',[
    //"我的"首页
    'index'=>['api/Usercenter/index',['method' => 'get']],
    //成为赞助商
    'tosponsor'=>['api/Usercenter/tosponsor',['method' => 'post']],
    //中奖记录
    'winrecord'=>['api/Usercenter/winrecord',['method' => 'get']],
    //创建奖品记录
    'mycreate'=>['api/Usercenter/mycreate',['method' => 'get']],
    //我参与的奖品记录
    'myjoin'=>['api/Usercenter/myjoin',['method' => 'get']],
    //常见问题
    'faqdata'=>['api/Usercenter/faqdata',['method' => 'get']],
    //更新formid
    'editformid'=>['api/Usercenter/editformid',['method' => 'put']],

]);

//用户收货地址接口
Route::group('api/address',[
    //首页
    'list'=>['api/Luckaddress/receiveaddress',['method' => 'get']],
    //保存收货地址
    'save'=>['api/Luckaddress/saveaddress',['method' => 'post']],
    //删除收货地址
    'delete'=>['api/Luckaddress/deladdress',['method' => 'put']],
    //设置默认收货地址
    'setdefault'=>['api/Luckaddress/setdefault',['method' => 'put']],
    //获取地址详情
    'detail'=>['api/Luckaddress/addressdetail',['method' => 'get']],
]);


//抽奖相关接口
Route::group('api/prize',[
    //首页
    'index'=>['api/Luckprize/index',['method' => 'get']],
    //已开奖数据
    'openprize'=>['api/Luckprize/openprize',['method' => 'get']],
    //奖品详情
    'detail'=>['api/Luckprize/prizedetail',['method' => 'get']],
    //参与抽奖
    'join'=>['api/Luckprize/joinprize',['method' => 'put']],
    //参与抽奖用户
    'joinusers'=>['api/Luckprize/joinusers',['method' => 'get']],
    //获取中奖者收货地址
    'winneraddr'=>['api/Luckprize/winneraddress',['method' => 'get']],
    //中奖者列表数据
    'winners'=>['api/Luckprize/winnerlist',['method' => 'get']],
    //中奖者领取奖品
    'receive'=>['api/Luckprize/receiveprize',['method' => 'post']],
    //创建抽奖
    'create'=>['api/Luckprize/createprize',['method' => 'post']],
    //生成二维码
    'wechatcode'=>['api/Luckprize/wechatcode',['method' => 'put']],
    //定时程序发送模板消息
    'sendtempmsg'=>['api/Luckprize/sendtempmsg',['method' => 'post']],
    //获取邀请的用户列表
    'luckstars'=>['api/Luckprize/luckstarlist',['method' => 'get']],

]);



//加群小程序相关接口
Route::group('api/group',[
    //首页
    'list'=>['groupapi/Groups/groupList',['method' => 'get']],
    //科室列表数据
    'deps'=>['groupapi/Groups/depList',['method' => 'get']],
    //城市数据信息
    'citys'=>['groupapi/Groups/cityList',['method' => 'get']],
    //热门微信群
    'hots'=>['groupapi/Groups/hotList',['method' => 'get']],
    //扫描二维码页面
    'detail/:groupid/[:datatype]'=>['groupapi/Groups/groupDetail',['method' => 'get']],
    //banner数据
    'banner'=>['groupapi/Groups/bannerList',['method' => 'get']],
    //微信发消息
    'wechatmsg/[:datatype]'=>['groupapi/Messagepush/wechatMsg',['method' => 'get|post']],


]);

return [

];
